package edu.cth.scrabbit.client.core;

import java.util.List;

import edu.cth.scrabbit.shared.GameLetter;
import edu.cth.scrabbit.shared.GameState;

/**
 * This interface contains all information that is important to represent the 
 * game as it exist on the server
 * 
 * @author Anders Jonsson, Marcus Harryson
 * 
 */
public interface IClientModel {
	
	/**
	 * 
	 * Method used to connect this client to a host.
	 * @param ip
	 * @param nickname
	 * @param isHost
	 */
	public abstract void joinGame(String ip, String nickname, boolean isHost);

	/**
	 * Method that tells the client to start attempt to connect to the given ip
	 * @param ip
	 */
	
	public abstract void startListening(String ip);

	/**
	 * Method that tries to start the game. 
	 */
	
	public abstract void startGame();
	
	/**
	 * Method that receives a game state with information about the game
	 * @param gs
	 */

	public abstract void processGameUpdate(GameState gs);
	
	/**
	 * A method that informs the server that the player wishes to pass
	 */

	public abstract void pass();

	/**
	 * A method that informs the server that the player wishes to swap the 
	 * own letters
	 */
	
	public abstract void swap();

	/**
	 * A method that informs the server that the player wants to play a word 
	 * which contains the letters in the list placeLetters
	 * @param placedLetters
	 */
	
	public abstract void play(List<GameLetter> placedLetters);

	/**
	 * A method that informs the server that the user wants to clear all of his 
	 * current own letter on the board
	 */
	public abstract void clear();

	/**
	 * A method used to put the player's letter on the game board, which will remain 
	 * "temporary" until the player presses an action button 
	 * @param letter
	 */
	public abstract void addTemporaryLetter(GameLetter letter);

}